﻿ 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using DAL;
using IDAL;
using Models;

namespace DALFactory
{
    /// <summary>
    /// EF数据会话层,负责完成所有的数据操作类的实例创建,业务层通过数据会话层来获取想要操作的实例
    /// </summary>
    public partial class DALsession:IDALsession
    {
		
        private IAPIInfoDAL _APIInfoDAL;
        public IAPIInfoDAL APIInfoDAL 
        {
            get
            {
                if (_APIInfoDAL == null)
                {
                    _APIInfoDAL = DALFactory.CreateAPIInfoDAL();
                }
                return _APIInfoDAL;
            }
            set
            {
                _APIInfoDAL = value;
            }
        }   
        
 	
        private IAppInfoDAL _AppInfoDAL;
        public IAppInfoDAL AppInfoDAL 
        {
            get
            {
                if (_AppInfoDAL == null)
                {
                    _AppInfoDAL = DALFactory.CreateAppInfoDAL();
                }
                return _AppInfoDAL;
            }
            set
            {
                _AppInfoDAL = value;
            }
        }   
        
 	
        private ICommentInfoDAL _CommentInfoDAL;
        public ICommentInfoDAL CommentInfoDAL 
        {
            get
            {
                if (_CommentInfoDAL == null)
                {
                    _CommentInfoDAL = DALFactory.CreateCommentInfoDAL();
                }
                return _CommentInfoDAL;
            }
            set
            {
                _CommentInfoDAL = value;
            }
        }   
        
 	
        private IMusicInfoDAL _MusicInfoDAL;
        public IMusicInfoDAL MusicInfoDAL 
        {
            get
            {
                if (_MusicInfoDAL == null)
                {
                    _MusicInfoDAL = DALFactory.CreateMusicInfoDAL();
                }
                return _MusicInfoDAL;
            }
            set
            {
                _MusicInfoDAL = value;
            }
        }   
        
 	
        private INovelInfoDAL _NovelInfoDAL;
        public INovelInfoDAL NovelInfoDAL 
        {
            get
            {
                if (_NovelInfoDAL == null)
                {
                    _NovelInfoDAL = DALFactory.CreateNovelInfoDAL();
                }
                return _NovelInfoDAL;
            }
            set
            {
                _NovelInfoDAL = value;
            }
        }   
        
 	
        private IRecordInfoDAL _RecordInfoDAL;
        public IRecordInfoDAL RecordInfoDAL 
        {
            get
            {
                if (_RecordInfoDAL == null)
                {
                    _RecordInfoDAL = DALFactory.CreateRecordInfoDAL();
                }
                return _RecordInfoDAL;
            }
            set
            {
                _RecordInfoDAL = value;
            }
        }   
        
 	
        private IRoleInfoDAL _RoleInfoDAL;
        public IRoleInfoDAL RoleInfoDAL 
        {
            get
            {
                if (_RoleInfoDAL == null)
                {
                    _RoleInfoDAL = DALFactory.CreateRoleInfoDAL();
                }
                return _RoleInfoDAL;
            }
            set
            {
                _RoleInfoDAL = value;
            }
        }   
        
 	
        private IStickInfoDAL _StickInfoDAL;
        public IStickInfoDAL StickInfoDAL 
        {
            get
            {
                if (_StickInfoDAL == null)
                {
                    _StickInfoDAL = DALFactory.CreateStickInfoDAL();
                }
                return _StickInfoDAL;
            }
            set
            {
                _StickInfoDAL = value;
            }
        }   
        
 	
        private IUserInfoDAL _UserInfoDAL;
        public IUserInfoDAL UserInfoDAL 
        {
            get
            {
                if (_UserInfoDAL == null)
                {
                    _UserInfoDAL = DALFactory.CreateUserInfoDAL();
                }
                return _UserInfoDAL;
            }
            set
            {
                _UserInfoDAL = value;
            }
        }   
        
 	
        private IVideoInfoDAL _VideoInfoDAL;
        public IVideoInfoDAL VideoInfoDAL 
        {
            get
            {
                if (_VideoInfoDAL == null)
                {
                    _VideoInfoDAL = DALFactory.CreateVideoInfoDAL();
                }
                return _VideoInfoDAL;
            }
            set
            {
                _VideoInfoDAL = value;
            }
        }   
        
 	
        private IVideoRecordInfoDAL _VideoRecordInfoDAL;
        public IVideoRecordInfoDAL VideoRecordInfoDAL 
        {
            get
            {
                if (_VideoRecordInfoDAL == null)
                {
                    _VideoRecordInfoDAL = DALFactory.CreateVideoRecordInfoDAL();
                }
                return _VideoRecordInfoDAL;
            }
            set
            {
                _VideoRecordInfoDAL = value;
            }
        }   
        
  }
 }